using System;
using System.Windows.Forms;
using System.Drawing;

/*  XBox360 To Flash Launcher
 * ===========================
 *      Made by joon.be
 * 
 * This code will help you create a game launcher that will do the following:
 * - launch whichever .EXE file you want (ideally a Flash projector)
 * - translate XBox 360 controls to keyboard controls
 * - play whicever game you want with your XBox controller(s)
 * 
 * The program made to be is 'invisible, meaning you won't be able to see 
 * it in your taskbar or when you alt+tab.
 * It is technically not just a launcher, as it remains running in the background. 
 * However it will exit itself the moment the game process is closed.
 * 
 * Have fun playing, 
 * 
 * contact me at: joon@joon.be or 
 * or on twitter: @joonturbo
 * check out the game for which this was initially developed here: LAZAKNITEZ.COM
 */

namespace be.joon.xbox360toflashlauncher
{
#if WINDOWS || XBOX
    static class Program
    {
        static void Main(string[] args)
        {
            using (Launcher game = new Launcher())
            {
                Form frm = (Form)Form.FromHandle(game.Window.Handle);
                frm.FormBorderStyle = FormBorderStyle.None;                 // Removes the title bar (redundant)
                frm.ShowInTaskbar = false;                                  // Hides it from taskbar
                frm.Opacity = 0;                                            // Makes it invisible
                frm.FormBorderStyle = FormBorderStyle.FixedToolWindow;      // Hides it from alt+tab
                game.Run();  
            }
        }
    }
#endif
}

